#include <bits/stdc++.h>

using namespace std;

typedef long long ll;

const int N = 1e6 + 5;
const int M = 998244353;

ll n;

int main()
{
#ifdef LOCAL
    freopen("in.txt", "r", stdin);
    freopen("out.txt", "w", stdout);
#endif
    ios::sync_with_stdio(false), cin.tie(0);

    cin >> n;
    ll res = 0;
    for (ll q = 1; 1ll * q * q <= n; q++)
    {
        ll maxp = min(n * 2 - q, n / q);

        if (maxp < q)
            continue;

        ll cnt = maxp - q + 1;
        res = (res + cnt / 2 + (cnt & 1)) % M;

    }

    cout << res << endl;  
    return 0;
}